package com.fulu.game.bi.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum OsEnum {

    UNDEFINED(0,"UNDEFINED"),
    H5(1, "H5"),
    PC(2, "PC"),
    ANDROID(3, "ANDROID"),
    IOS(4, "IOS"),
    APPLET(5, "APPLET");

    private Integer type;
    private String msg;


    public static OsEnum parse(Integer type) {
        for (OsEnum e : OsEnum.values()) {
            if (Objects.equals(e.getType(), type)) {
                return e;
            }
        }
        return OsEnum.UNDEFINED;
    }

}
